<script setup lang="ts">
import { ref, defineProps, defineEmits } from 'vue'

const emits = defineEmits(['close', 'open'])

interface c {
  name: String
  id: Number
}

const props = defineProps({
  list: {
    type: Array,
    default: []
  },
  show: {
    type: Boolean,
    default: false
  }
})
</script>

<template>
  <view class="example-drop-down-container">
    <u-status-bar></u-status-bar>
    <u-popup
      :show="show"
      mode="top"
      @close="emits('close')"
      @open="emits('open')"
      safeAreaInsetTop="true"
    >
      <view class="p">
        <view class="list">
          <up-button
            v-for="item in props.list"
            :text="item.name"
            :key="item.id"
          ></up-button>
        </view>
      </view>
    </u-popup>
  </view>
</template>

<style scoped lang="scss"></style>
